package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.sky.entity.Sales;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderDetailMapper {

    int insertBatch(List<OrderDetail> orderDetails);

    @Select("select * from order_detail where order_id = #{orderId};")
    List<OrderDetail> getByOrderId(Long orderId);

    /**
     * 统计前世的
     * @return
     */
    List<Sales> topDishes(Map map);
}
